<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <script src="static/js/jquery-3.3.1.min.js"></script>
</head>
<body>
  <div id="content">

  </div>
</body>
<script>
  $(function(){
      var topicId = GetQueryString("topicId");
      $.ajax({
          url: "/topic/"+topicId,
          dataType: "json",
          success: function(data){
            console.log(data);


          }
      });
  })

  function GetQueryString(name){
      var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
      var r = window.location.search.substr(1).match(reg);
      if(r!=null)return  unescape(r[2]); return null;
  }
</script>
</html>